import axios from "./axios";

const user = {
    register: (data) => {
      return axios({
          method: 'post',
          url: '/user/register',
          data
      })
    },
    login: (data) => {
      return axios({
          method: 'post',
          url: '/user/login',
          data
      })
    },
    getInfo: (userId) => {
      return axios({
          method: 'get',
          url: '/user/info',
          params: {
              userId
          }
      })
    },
    rank: (count) => {
        return axios({
            method: 'get',
            url: '/user/rank',
            params: {
                count: count
            }
        })
    }
}

export default user